<?php
/**
 * Created by PhpStorm.
 * User: ari
 * Date: 11/20/14
 * Time: 7:26 PM
 */
namespace BC\User\Role;

use CPath\Request\IRequest;
use CPath\Response\IResponse;

interface IRole
{
	/**
	 * Get Role PGP fingerprint
	 * @return string
	 */
	function getFingerprint();

	/**
	 * Execute Role Function
	 * @param IRequest $Request
	 * @param $rolePassPhrase
	 * @return IResponse
	 */
	function executeRoleFunction(IRequest $Request, $rolePassPhrase);


	/**
	 * Get Role Identifier
	 * @return mixed
	 */
	//function getRoleID();

	/**
	 * Get Role Grant file path
	 * @return string
	 */
	// function getGrantFilePath();

//	/**
//	 * Grant Role to a role entity by fingerprint
//	 * @param IRequest $Request
//	 * @param string $newFingerprint
//	 * @internal param string $rolePassPhrase
//	 * @return mixed
//	 */
//	function onGrantRole(IRequest $Request, $newFingerprint);

	/**
	 * Get Role public key fingerprint
	 * @return string
	 */
	//function getRoleFingerprint();

	/**
	 * Get a new instance of this IRole
	 * @param $fingerprint
	 * @return IRole
	 */
	static function getRoleInstance($fingerprint);
}